package com.example.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author : chenjianhua
 * @date : 10:05 2021/2/24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultUtil  {
    private boolean success;  //是否成功
    private Integer code;           //状态码
    private String  message;  //返回信息
    private Object data;      //返回数据

    public ResultUtil(ResultCodeUtil resultCode, Object data) {
        this.success = resultCode.success;
        this.code = resultCode.code;
        this.message = resultCode.message;
        this.data = data;
    }
    public ResultUtil(ResultCodeUtil resultCode) {
        this.success = resultCode.success;
        this.code = resultCode.code;
        this.message = resultCode.message;
    }
}
